package com.huluobo.a2206douyindemo;

import android.app.Application;
import android.util.Log;

import com.huluobo.base.db.AppDBUtils;
import com.hyphenate.chat.EMClient;
import com.hyphenate.chat.EMOptions;
import com.tencent.live2.V2TXLivePremier;
import com.tencent.rtmp.TXLiveBase;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.socialize.PlatformConfig;

/**
 * Created by LC on 2024/8/20.
 */
public class DouyinApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        UMConfigure.init(this, "66c47494192e0574e7667dff", "umeng", UMConfigure.DEVICE_TYPE_PHONE, "");
        // QQ设置
        PlatformConfig.setQQZone("101830139", "5d63ae8858f1caab67715ccd6c18d7a5");

        //Room数据库初始化
        AppDBUtils.getInstance().init(this);

        EMOptions options = new EMOptions();
        options.setAppKey("moroks#2202douyinkotlindemo");
        EMClient.getInstance().init(this, options);

        String licenceURL = "https://license.vod2.myqcloud.com/license/v2/1329094572_1/v_cube.license"; // 获取到的
        // licence url
        String licenceKey = "05a666153c02888ed21a48cc380ad03f"; // 获取到的 licence key
        V2TXLivePremier.setLicence(this, licenceURL, licenceKey);
        V2TXLivePremier.setObserver(new V2TXLivePremier.V2TXLivePremierObserver() {
            @Override
            public void onLicenceLoaded(int result, String reason) {
                Log.i("TagA", "onLicenceLoaded: result:" + result + ", reason:" + reason);
            }
        });


    }
}
